<template>
	<view class="u-content" style="padding: 20rpx;">
		
		<view class="">
			<image src="https://blog.dbsgw.com/content/templates/Fys/images/random/4.jpg" mode="aspectFill"></image>
		</view>
		<view class="article_text">
			{{article.title}}
		</view>
		<view style="margin-bottom: 10px;">
			<info></info>
		</view>
		<u-parse :html="article.content_html"></u-parse>

		<loading ref="loading"></loading>
	</view>
</template>

<script>
	import loading from '../../components/loading/loading.vue'
	import info from '../../components/info.vue'
	import {
		queryAnsweArticle
	} from './api/api.js'

	export default {

		data() {
			return {
				article: {}
			};
		},
		onLoad(option) {
			console.log(option)
			queryAnsweArticle(option.id).then(x => {
				console.log(x)
				this.$refs.loading.hide()
				this.article = x.data.data[0]
			})
		},
		components: {
			loading,
			info
		},
	}
</script>

<style scoped>
	.article_text {
		height: 120rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		border-left: 10rpx solid #ccc;
		background: #f6f6f6;
		padding: 20rpx;
		margin: 10rpx 0;
	}
</style>
